Various applications exist in which it is advantageous to have software/firmware perform various timing functions. One such application is found in controllers for ink jet printers. Use of firmware timing provides flexibility in the control of signal timing operations to enable a particular controller design to be utilized by a variety of printers. As these printers employ various types of ink cartridges with different numbers and types of nozzles, each potentially requiring different timing of firing pulses, one can readily appreciate the advantage of having a single hardware device whose timing functions can be modified by employing firmware timing.
Use of firmware to generate accurate timing signals needs to address an inherent problem associated with processor execution flow. In the example where firmware is used to compute and update a digital signal coming out of a processor core, the actual time instants when the signal update instructions are executed are determined by the processor execution flow. As a result, changes in the processor execution flow cause variations in the generated timing signals. Consequently, this signal update timing is generally far from the required timing. Moreover, it is sensitive to firmware changes. A problem exists as to how to use firmware to generate signals with a timing that is required by a hardware protocol and to make the signal timing insensitive to reasonable firmware code changes.
One prior art technique for solving this problem relates to using a machine instruction whose execution time has a fixed number of machine cycles. The execution time of such an instruction is absolutely predictable and independent of data and execution context. By way of example, let such an instruction be completed in one clock pulse. Further by way of example, let this instruction be called “NO-OPERATION”, taking a single clock cycle and resulting in no detectable change of firmware execution results. It should be noted that most processors have a special instruction with such properties.
This “NO-OPERATION” instruction can be used to adjust timing for firmware computing and updating input and output signaling. That is, proper insertion of “NO-OPERATION” instructions in different lines of the firmware code can be used to delay signal changing instruction executions in a manner that performs the required timing. However, this procedure is very labor intensive and requires complete realignment of “NO-OPERATION” insertions in the case of even minor code changes.